#ifndef __CARPET_BLOCK_H__
#define __CARPET_BLOCK_H__

#include "Block.hpp"

namespace PocketSurvival
{
    // 地毯
    class CarpetBlock : public Block
    {
    public:
        static constexpr int32_t Index()
        {
            return 208;
        }
		virtual int32_t getIndex() override; 
        virtual const std::string &getBlockName() override;

		virtual bool isFaceTransparent(int32_t face, int32_t value) override;
        virtual void getCreativeValues(std::vector<int32_t> &blockVec) override;
        virtual void getDropValues(int32_t oldValue, int32_t newValue, int32_t toolLevel, std::vector<BlockDropValue> &dropValues) override;
        
        virtual const std::vector<BoundingBox> &getCustomCollisionBoxes(int32_t value) override;

        static inline int32_t GetColor(int32_t data);
        static inline int32_t SetColor(int32_t data, int32_t color);
		
    };

    inline int32_t CarpetBlock::GetColor(int32_t data)
    {
        return data & 0xF;
    }
    inline int32_t CarpetBlock::SetColor(int32_t data, int32_t color)
    {
        return (data & -16) | (color & 0xF);
    }
} // namespace PocketSurvival


#endif
